package cn.tedu.spring.di;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

/**
 * 控制层
 * 不分层
 * 数据访问层
 * 业务逻辑层
 */
//@Component
//@Controller
//@Service
@Repository
public class UserDao {
    @Value("jdbc:mysql://localhost:3308/tedu")
    private String url;
    @Value("root")
    private String username;
    //@Value("123456")
    private String password;
    @Value("123456")
    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "UserDao{" +
                "url='" + url + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
